From: Aaron Schulz Date: Fri, 21 Mar 2008 04:50:34 +0000 (+0000) Subject: Don't show checkbox is the user can't use it X-Git-Tag: 1.31.0-rc.0~48905 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=fcaf44489ef8449070f65e46f1589d7ee9027cff;p=lhc%2Fweb%2Fwiklou.git Don't show checkbox is the user can't use it --- diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index f56beb4285..2f56ae88a5 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -972,6 +972,18 @@ class UndeleteForm { # Format the user-visible controls (comment field, submission button) # in a nice little table $align = $wgContLang->isRtl() ? 'left' : 'right'; + if( $wgUser->isAllowed( 'oversight' ) ) { + $unsuppressBox = + " +   + " . + Xml::check( 'wpUnsuppress', $this->mUnsuppress, array('id' => 'mw-undelete-unsupress') ) . ' ' . + Xml::label( wfMsgHtml('revdelete-unsuppress'), 'mw-undelete-unsupress' ) . + " + "; + } else { + $unsuppressBox = ""; + } $table = Xml::openElement( 'fieldset' ) . Xml::element( 'legend', null, wfMsg( 'undelete') ). @@ -995,14 +1007,8 @@ class UndeleteForm { Xml::submitButton( wfMsg( 'undeletebtn' ), array( 'name' => 'restore', 'id' => 'mw-undelete-submit' ) ) . Xml::element( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'undeletereset' ), 'id' => 'mw-undelete-reset' ) ) . " - - -   - " . - Xml::check( 'wpUnsuppress', $this->mUnsuppress, array('id' => 'mw-undelete-unsupress') ) . ' ' . - Xml::label( wfMsgHtml('revdelete-unsuppress'), 'mw-undelete-unsupress' ) . - " " . + $unsuppressBox . Xml::closeElement( 'table' ) . Xml::closeElement( 'fieldset' );